<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>[title]</title>
    <link rel="shortcut icon" href="favicon.ico">
    <link href="/Public/Admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/Public/Admin/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/Admin/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="/Public/Admin/css/animate.min.css" rel="stylesheet">
    <link href="/Public/Admin/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="/Public/Admin/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
	<script src="/Public/Admin/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<style>
	.form-group{
	margin-right:20px;
	margin-top: 5px;"
	}
</style>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <!-- Panel Other -->
    <div class="ibox float-e-margins">
        <div class="ibox-title"  class="col-md-6">
            <h5>用户列表</h5>
        </div>
        <div class="ibox-content">
            <!--搜索框开始-->
            <form id='commentForm' role="form" method="get" class="form-inline">
                <div class="content clearfix m-b">
                    <div class="form-group">
                        <label>用户名：</label>
                        <input type="text" class="form-control" id="username" name="username" value="<?php echo ($_GET['loginName']); ?>">
                    </div>
                    <div class="form-group">
                        <button class="btn btn-primary" type="submit" style="margin-top:5px" id="search"><strong>搜 索</strong>
                        </button>
                    </div>
                </div>
            </form>
            <!--搜索框结束-->
            <div class="hr-line-dashed"></div>
				<div class="example-wrap">
					<div class="example">
						<div class="bootstrap-table">
							<div class="fixed-table-container" style="height: 641px; padding-bottom: 36px;">
								<div class="fixed-table-header" style="margin-right: 0px;"></div>
								<div class="fixed-table-body">
									<table id="cusTable" data-height="700" class="table table-hover table-striped">
										<thead>
											<th tabindex="0">
												<div class="th-inner ">用户名</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">姓名</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">手机号</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">推荐人</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">安置人</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">区域</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">总业绩</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">剩余业绩</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">会员级别</div>
											</th>
											<!--<th tabindex="0">
												<div class="th-inner ">荣誉级别</div>
											</th>-->
											<th tabindex="0">
												<div class="th-inner ">注册时间</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">状态</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">锁定</div>
											</th>
											<th tabindex="0">
												<div class="th-inner ">操作</div>
											</th>
										</thead>
										<tbody>
											<?php if(is_array($list['content'])): $i = 0; $__LIST__ = $list['content'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
												<td><?php echo ($vo['username']); ?></td>
												<td><?php echo ($vo['realname']); ?></td>
												<td><?php echo ($vo['phone']); ?></td>
												<td><?php echo ($vo['tuiuser']['username']); ?></td>
												<td><?php echo ($vo['jieuser']['username']); ?></td>
												<td><?php echo (getQuyuName($vo['quyu'])); ?></td>
												<td>【<?php echo ($vo['all_yeji1']); ?>】/【<?php echo ($vo['all_yeji2']); ?>】</td>
												<td>【<?php echo ($vo['yeji1']); ?>】/【<?php echo ($vo['yeji2']); ?>】</td>
												<td><?php echo (getLeavelName($vo['leavel'])); ?></td>
												<!--<td><?php echo (getHonorName($vo['honor_leavel'])); ?></td>-->
												<td><?php echo (getDateFormat($vo['reg_time'])); ?></td>
												<td><?php echo (getUserStatusName($vo['status'])); ?></td>
												<td><?php echo (getLockStatus($vo['lock'])); ?></td>
												<td>
													<div class="btn-group">
														<button class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
															操作 <span class="caret"></span>
														</button>
														<ul class="dropdown-menu">
															<li><a href="<?php echo U('User/update',['username'=>$vo['username']]);?>">编辑</a></li>
															<li><a href="<?php echo U('User/addUser',['username'=>$vo['username']]);?>">注册会员</a></li>
															<?php if(($vo['activation']) == "1"): ?><li><a  onClick="return confirm('确定操作?');" href="<?php echo U('User/activation',['username'=>$vo['username']]);?>">激活</a></li><?php endif; ?>
															<li><a href="<?php echo U('UserMoney/moneyInfo',['username'=>$vo['username']]);?>">用户资金信息</a></li>
															<li><a href="<?php echo U('Finance/financeLog',['username'=>$vo['username']]);?>">查看详细日志</a></li>
															<li><a href="<?php echo U('Finance/bonusLog',['username'=>$vo['username']]);?>">查看统计日志</a></li>
															<li><a href="<?php echo U('User/goToHome',['username'=>$vo['username']]);?>">进入前台</a></li>
														</ul>
													</div>
												</td>
											</tr><?php endforeach; endif; else: echo "" ;endif; ?>
											<tr><td colspan="14"><?php echo ($list['page']); ?></td>
											</tr>
										</tbody>
									</table>
								</div>
								<div class="pull-right pagination"></div>
							</div>
						</div>
						<div class="clearfix"></div>
					</div>
				</div>
            <!-- End Example Pagination -->
        </div>
    </div>
</div>
<!-- End Panel Other -->
</div>
<script src="/Public/Admin/js/jquery.min.js?v=2.1.4"></script>
<script src="/Public/Admin/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/Public/Admin/js/content.min.js?v=1.0.0"></script>
<script src="/Public/Admin/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/Public/Admin/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/Public/Admin/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script src="/Public/Admin/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<script src="/Public/Admin/js/plugins/layer/laydate/laydate.js"></script>
<script src="/Public/Admin/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="/Public/Admin/js/plugins/layer/layer.min.js"></script>
<link rel="stylesheet" href="/Public/Admin/js/plugins/zTree/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="/Public/Admin/js/plugins/zTree/jquery.ztree.core-3.5.js"></script>
<script type="text/javascript" src="/Public/Admin/js/plugins/zTree/jquery.ztree.excheck-3.5.js"></script>
<script type="text/javascript" src="/Public/Admin/js/plugins/zTree/jquery.ztree.exedit-3.5.js"></script>
<!-- 查看图片 -->
<div id="lookPic" onclick="closePic()"  style="display:none">
	<div class="lookPic">
		<img id="picccc"  src="">
	</div>
</div>
<style>
#lookPic{
	position:absolute;
	left:0;
	top:0;
	z-index:100;
	height:100%;
	width:100%;
	/*background:black;
	opacity:1;
	filter:alpha(opacity=40)*/
}
.lookPic{
     background:#fff;  
	 position:absolute;    
	 left:50%;    
	 top:50%;   
	 margin-left:-0px;   
	 margin-top:-0px;
}
</style>
<script>
	//查看图片
	function lookPic(pic){
		$('#lookPic').show();
		$('#picccc').attr('src',pic);
	}
	//关闭图片
	 function closePic(){
		 $('#lookPic').hide();
			$('#picccc').attr('src','');
	}
</script>
<!-- 查看图片结束 -->
<script type="text/javascript">
    function shopUserDel(id){
        layer.confirm('确认删除此商户账号?', {icon: 3, title:'提示'}, function(index){
            //do something
            $.getJSON("<?php echo U('shopUser/delete');?>", {'shopID' : id}, function(res){
                if(res.status == true){
                    layer.alert('删除成功');location.reload(); 
                }else{
                    layer.alert('删除失败');
                }
            }); 
            layer.close(index);
        })

    }
</script>
</body>
</html>